<template>
	<view>
		<succeed :title="title" :buttonTitle="buttonTitle" :info="info" :url="url"></succeed>
	</view>
</template>

<script>
	import succeed from '@/components/xjbg/succeed.vue'
	export default {
		data() {
			return {
				title:'您的任务已发布',
				buttonTitle:'查看任务',
				info:'审核时间预计3分钟',
				name:'成功',
				url:'/pages/index/index'
			};
		},
		components:{
			succeed,
		},
		onBackPress() {
			if(this.buttonTitle=="返回首页"){
				console.log('来到这里2')
				uni.switchTab({
					url: '/pages/index/index'
				});
			}else{
				uni.redirectTo({
					url:url
				})
			}
			return true
		},
		onLoad(v) {
			this.title=v.title
			this.buttonTitle=v.buttonTitle
			this.info=v.info
			this.name=v.name
			uni.setNavigationBarTitle({
				title:this.name
			})
		},
	}
</script>

<style lang="less" scoped>

</style>
